import java.awt.*;

/**
 * @author Yyming
 * @version 10.0
 * Created by Yyming on 2021/2/24
 */
public class FontTest {
    public static void main(String[] args) {
        Font font = new Font("dialog", Font.PLAIN, 12);
        FontMetrics fontMetrics = Toolkit.getDefaultToolkit().getFontMetrics(font);
        System.out.println(fontMetrics.toString());


        font = new Font("dialog", Font.PLAIN, 24);
        fontMetrics = Toolkit.getDefaultToolkit().getFontMetrics(font);
        System.out.println(fontMetrics.toString());
    }
}
